package com.runewbie.pafcmall.product.web;

import com.runewbie.pafcmall.product.service.SkuInfoService;
import com.runewbie.pafcmall.product.vo.sku.SkuItemVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author: li_jian
 * @version: 1.0
 * @date: 2021/3/6 22:56
 * @description： 展示商品详情页
 */
@Controller
public class ItemController {

    @Autowired
    private SkuInfoService skuInfoService;

    /**
     * 展示当前sku的详情
     * @param skuId
     * @return
     */
    @GetMapping("/{skuId}.html")
    public String skuItem(Long skuId){
        System.out.println("准备查询"+skuId+"详情");
        SkuItemVo vo = skuInfoService.item(skuId);
        return "item";
    }
}
